﻿using System;


/// <summary>
/// Constants类 集中存放系统常量
/// </summary>
public class Constants
{
    // 登录后User类存在Session中的键值
    public static string SESS_USER_KEY = "WISHWALL_SESS_USER_KEY";

    // 验证码存放在Session中的键值
    public static readonly string SESS_VALIDATE_CODE_KEY = "WISHWALL_SESS_VALIDATE_CODE_KEY";

    /// <summary>
    /// 系统角色
    /// </summary>
    public static readonly int ROLE_USER = 1;
    public static readonly int ROLE_ADMIN = 99;

    /// <summary>
    /// 默认每页记录数
    /// </summary>
    public static readonly int DEFAULT_PAGE_SIZE = 50;

    /// <summary>
    /// 许愿时的约束形式
    /// </summary>
    public static readonly char ADD_WISH_ANYONE = '0';           // 任何人可许愿（但要填验证码）
    public static readonly char ADD_WISH_HAS_PASSWORD = '1';     // 许愿时需要密码
    public static readonly char ADD_WISH_ONLY_FRIEND = '2';      // 好友可许愿（要填验证码）


    public static readonly char VIEW_LIMIT_ANYONE = '0';         // 任何人可查看许愿墙
    public static readonly char VIEW_LIMIT_REQUIRES_CODE = '1';  // 查看时需要密码
    public static readonly char VIEW_LIMIT_ONLY_FRIEND = '2';    // 好友可查看

    /// <summary>
    /// 系统提示信息
    /// </summary>
    public static readonly string INFO_NO_ACCESS = "您没有权限执行此操作";
    public static readonly string INFO_IO_ERR = "文件操作错误";
    public static readonly string INFO_PARAM_ERR = "参数错误";

    public static readonly string INFO_NETWORK_ERR = "网络连接错误";

    public static readonly string INFO_UNKNOWN_ERR = "未知错误";


}
